package com.qf.utils;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * 保护你的大熊
 * 2022/3/8
 * 19:37
 */
public class EsClient {

    public static RestHighLevelClient createClient(){

        HttpHost httpHost = new HttpHost("192.168.200.130",9200);

        RestClientBuilder builder = RestClient.builder(httpHost);

        RestHighLevelClient client = new RestHighLevelClient(builder);

        return client;

    }

}
